import Vue from 'vue'
import Vuex from 'vuex'
import App from './App.vue'

Vue.use(Vuex)

const store = new Vuex.Store({
  state: {
    count: 1000
  },
  mutations: {
    changeCount (state, payload) { 
      console.log('通过commit修改')
      state.count = payload
    }
  },
  getters: {
    bigNumber (state) { 
      return state.count * 100
    }
  },
  actions: {
    asyncChangeData ({ state,commit },payload) { 
      
    }
  }
})



new Vue({
  el: '#app',
  store,
  render: h => h(App)
})
